<template>
    <div>
        <img src="~@/assets/test.jpg" alt="缩略图" @click="handleClickGalleryItem">
    </div>
</template>

<script>
    export default {
        name: "HistoryGalleryItem",
        props: {
            index: {
                type: Number,
                required: true
            }
        },
        methods: {
            handleClickGalleryItem() {
                this.$emit('galleryItemClick', this.index);
            }
        }
    }
</script>

<style lang="scss" scoped>
    @import "~@/styles/global.scss";

    div {
        width: 100%;
        overflow: hidden;
        margin-right: 10px;
        img {
            width: 100%;
            cursor: pointer;
            transition: all .4s;

            &:hover{
                filter: brightness(.4);
            }
        }
    }
</style>
